package JAVASE516;

import java.util.Scanner;

public class JAVAscore {
    public static void main(String[] argc){
        int[] arr=new int[6];
        int score=0;
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入6位老师的打分：");
        for (int i = 0; i < arr.length; i++) {
            arr[i]= sc.nextInt();
            score=score+arr[i];
        }
        score=score-min(arr)-max(arr);
        System.out.println(score/4);

    }
    public static int min(int[] arr){
        int min=arr[0];
        for (int i = 1; i < arr.length; i++) {
            if(arr[i]<min){
                min=arr[i];
            }
        }
        return min;
    }
    public static int max(int arr[]){
        int max=arr[0];
        for (int i = 1; i < arr.length; i++) {
            if(arr[i]>max){
                max=arr[i];
            }
        }
        return max;
    }


}
